package net.smartlab.android.callmanager;

import net.smartlab.android.callmanager.services.MusicService;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

public class AndroidCallManagerActivity extends Activity {
	/** Called when the activity is first created. */

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		LayoutInflater inflater = getLayoutInflater();
		View view = inflater.inflate(R.layout.toast_layout,(ViewGroup) findViewById(R.id.toast_layout_root));
		ImageView image = (ImageView) view.findViewById(R.id.image);
		image.setImageResource(R.drawable.images);
		TextView text = (TextView) view.findViewById(R.id.text);
		text.setText("Heila pirla");
		setContentView(view);
		startService(new Intent(this, MusicService.class));
//		setContentView(R.layout.main);
	}

	/* (non-Javadoc)
	 * @see android.app.Activity#onBackPressed()
	 */
	@Override
	public void onBackPressed() {
		stopService(new Intent(this, MusicService.class));
		super.onBackPressed();
	}

	/* (non-Javadoc)
	 * @see android.app.Activity#onResume()
	 */
	@Override
	protected void onResume() {
		startService(new Intent(this, MusicService.class));
		super.onResume();
	}

	/* (non-Javadoc)
	 * @see android.app.Activity#onPause()
	 */
	
}